package com.example.controller;

import com.example.config.MyAspect;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Description:
 * User: 阿宾
 * Date: 2025-04-29
 * Time: 15:18
 */
@Slf4j
@RestController
@RequestMapping("/user")
public class UserController {
    @RequestMapping("/u1")
    public String u1(){
        log.info("执行u1方法");
        return "u1";
    }
    @MyAspect
    @RequestMapping("/u2")
    public boolean u2(){
        log.info("执行u2方法");
        int a = 10 / 0;
        return true;
    }
}
